import request from '@/axios'
import { ParamType } from './types'

export const getParamListApi = (params: any) => {
  return request.get<ParamType[]>({ url: '/check/param', params })
}

export const addParamApi = (data: any) => {
  return request.post({ url: '/check/param', data })
}

export const putParamApi = (data: any) => {
  return request.put({ url: `/check/param/${data.id}`, data })
}

export const deleteParamApi = (ids: string[] | number[]) => {
  return request.delete({ url: '/check/param', data: ids })
}

export const getParamOptionApi = () => {
  return request.get({ url: '/check/param/options' })
}
